package com.allqj.sfx.domain.service;

import com.allqj.sfx.domain.entity.TableHeader;
import com.allqj.sfx.domain.enums.PageEnum;
import com.allqj.sfx.domain.repository.TableHeaderRepository;
import org.springframework.stereotype.Component;

/**
 * @author sjw
 * @className TableHeaderService
 * @date 2022/7/21 9:12
 * @description: 列表表头服务
 */
@Component
public class TableHeaderService {
    private final TableHeaderRepository tableHeaderRepository;

    public TableHeaderService(TableHeaderRepository tableHeaderRepository) {
        this.tableHeaderRepository = tableHeaderRepository;
    }


    public TableHeader header(PageEnum table) {
        return tableHeaderRepository.queryByTable(table.getCode());
    }
}
